package com.yunduansing.demo.mapper;

import com.yunduansing.demo.entity.RoleEntity;

import org.apache.ibatis.annotations.Select;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author yunduansing
 * @since 2020-05-24
 */
public interface RoleMapper extends BaseMapper<RoleEntity> {
    @Select("select * from sys_role a left join sys_user_role b on a.id=b.role_id where b.user_id=#{userId}")
    List<RoleEntity> getListByUser(int userId);
}
